﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.IO;

namespace produccion.forms
{
    /// <summary>
    /// Lógica de interacción para Window2.xaml
    /// </summary>
    public partial class FRMFoto : Window
    {
        public string Ruta;
        public FRMFoto()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            BitmapImage b = new BitmapImage();
            if (File.Exists(Ruta))
            {
                b.BeginInit();
                b.UriSource = new Uri(Ruta);
                b.EndInit();
                imgFoto.Stretch = Stretch.Fill;
                imgFoto.Source = b;
            }
            else
            {
                imgFoto.Source = null;
            }
        }


        private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
